package edu.suda.basic.acm;

import java.util.ArrayList;
import java.util.Collection;
import java.util.LinkedList;
import java.util.Queue;

public class Q
{

	private static Queue<String> q = new LinkedList<String>();

	public static void main(String[] args)
	{
		String a[] = new String[] { "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p", "q", "r", "s", "t", "u", "v", "w", "x", "y", "z" };
		Collection<String> c = new ArrayList<String>();
		c.add("1");
		c.add("2");
		c.add("3");
		// Putting the element into queue
		for (int i = 0; i < a.length; i++)
		{
			q.offer(a[i]);
		}
		// Getting the head element of queue
		System.out.println(q.peek());
		System.out.println(q.element());
		q.add("0");
		q.addAll(c);
		// Getting the size of queue
		System.out.println(q.size());
		// Pop the element
		while (q.size() > 0)
		{
			System.out.print(q.poll() + ",");
		}
		// Remove all element of queue
		q.clear();
	}

}
